package org.ami.onlineschool.model;

import java.util.ArrayList;
import java.util.List;

public class School {
	private List<Course> courses = new ArrayList<Course>();
	private List<Student> students = new ArrayList<Student>();
	private List<StudentBatch> studentBatches = new ArrayList<StudentBatch>();
	
	public List<Student> getStudents() {
		return students;
	}
	public void setStudents(List<Student> students) {
		this.students = students;
	}
	public List<StudentBatch> getStudentBatches() {
		return studentBatches;
	}
	public void setStudentBatches(List<StudentBatch> studentBatches) {
		this.studentBatches = studentBatches;
	}
	public List<Course> getCourses() {
		return courses;
	}
	public void setCourses(List<Course> courses) {
		this.courses = courses;
	}
	public List<Course> getCourses(List<String> ids) {
		
		List<Course> filteredCourses = new ArrayList<Course>();
		
		for (Course course : courses) {
			if(ids.contains(course.getId())) //FIXME: Performance
				filteredCourses.add(course);
		}
		
		return filteredCourses;
	}
	
	
}
